package com.demo.web_06;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

//创建ContextListener
public class ContextListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent
                                           servletContextEvent) {
        System.out.println("初始化 context");
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("销毁 context");
    }
}